package com.fastdevelop.framework.utils;

import android.Manifest;

/**
 * 常量类
 */
public class Constant {

    /**
     * 权限申请结果
     */
    public enum RequestPermissionResult {
        SUCCESS,//授权成功、已经授权
        SHOULD_SHOW_RATIONALE,//应该提示用户为何需要申请这样的权限的操作(可以通过展示Dialog、Toast提示用户)
        REJECT,//用户拒绝授权
    }

    /**
     * 权限申请类型
     */
    public enum RequestPermissionType{
        SINGLE,//单个权限
        MANY,//多个权限
    }

    /**
     * 对危险的权限归类（这些权限需要申请授权BaseActivity#requestDangerPermissions）
     */
    public class DangerPermissions {
        //android.permission-group.CALENDAR
        public static final String READ_CALENDAR = Manifest.permission.READ_CALENDAR;
        public static final String WRITE_CALENDAR = Manifest.permission.WRITE_CALENDAR;

        //android.permission-group.CAMERA
        public static final String CAMERA = Manifest.permission.CAMERA;

        //android.permission-group.CONTACTS
        public static final String READ_CONTACTS = Manifest.permission.READ_CONTACTS;
        public static final String WRITE_CONTACTS = Manifest.permission.WRITE_CONTACTS;
        public static final String GET_ACCOUNTS = Manifest.permission.GET_ACCOUNTS;

        //android.permission-group.LOCATION
        public static final String ACCESS_FINE_LOCATION = Manifest.permission.ACCESS_FINE_LOCATION;
        public static final String ACCESS_COARSE_LOCATION = Manifest.permission.ACCESS_COARSE_LOCATION;

        //android.permission-group.MICROPHONE
        public static final String RECORD_AUDIO = Manifest.permission.RECORD_AUDIO;

        //android.permission-group.PHONE
        public static final String READ_PHONE_STATE = Manifest.permission.READ_PHONE_STATE;
        public static final String CALL_PHONE = Manifest.permission.CALL_PHONE;
        public static final String READ_CALL_LOG = Manifest.permission.READ_CALL_LOG;
        public static final String WRITE_CALL_LOG = Manifest.permission.WRITE_CALL_LOG;
        public static final String ADD_VOICEMAIL = Manifest.permission.ADD_VOICEMAIL;
        public static final String USE_SIP = Manifest.permission.USE_SIP;
        public static final String PROCESS_OUTGOING_CALLS = Manifest.permission.PROCESS_OUTGOING_CALLS;

        //android.permission-group.SENSORS
        public static final String BODY_SENSORS = Manifest.permission.BODY_SENSORS;

        //android.permission-group.SMS
        public static final String SEND_SMS = Manifest.permission.SEND_SMS;
        public static final String RECEIVE_SMS = Manifest.permission.RECEIVE_SMS;
        public static final String READ_SMS = Manifest.permission.READ_SMS;
        public static final String RECEIVE_WAP_PUSH = Manifest.permission.RECEIVE_WAP_PUSH;
        public static final String RECEIVE_MMS = Manifest.permission.RECEIVE_MMS;
        public static final String READ_CELL_BROADCASTS = "";/*none*/

        //android.permission-group.STORAGE
        public static final String READ_EXTERNAL_STORAGE = Manifest.permission.READ_EXTERNAL_STORAGE;
        public static final String WRITE_EXTERNAL_STORAGE = Manifest.permission.WRITE_EXTERNAL_STORAGE;
    }
}
